﻿@model IEnumerable<HelloMinasan.Domain.QAComment>

@{
    ViewBag.Title = "My Answer";
}

<h2>MyAnswer</h2>

<div id="PersonContainer">
@Html.Partial("ShowMyAnwer", Model)
</div>
<script type="text/javascript">
    function OnCriteria(page, includeNewCriteria) {

        var crit = null;

        //if (includeNewCriteria) {
        //    crit = ($('#criteria'))[0].value;
        //} else {
        //    crit = ($('#lastedCriteria'))[0].value;
        //}

        $.ajax(
          {
              type: "GET",
              url: "/UserManagement/ShowMyAnwer?criteria=" + crit + "&page=" + page,
              success: function (result) {
                  $("#PersonContainer").html(result.toString());
              },

              error: function () {
                  alert("Searching failed!");
              }
          });
    }
</script>
